##https://blog.csdn.net/qq_37806908/article/details/97686753


clean:
	rm -rf *.o *.so *.out   data_generator  bch_encoder  bch_decoder  error *.txt 

gdata:
	gcc -o  data_generator     data_generator.c  -lm

bch_en:
	gcc -o  bch_encoder    bch_encoder.c  -lm
	
bch_de:
	gcc -o  bch_decoder    bch_decoder.c  -lm


err:
	gcc -o error   error.c  -lm 

all: gdata  bch_de   bch_en  err


run:
	./data_generator -n 64 > data_in.txt
	./bch_encoder -m 8 -k 64 -t 4 < data_in.txt    > data_codeword.txt
	./error -e 24 < data_codeword.txt > data_error.txt
	./bch_decoder -m 8 -k 64 -t 4 < data_error.txt > data_out.txt	


